﻿using LJ.WebApi.Mvc.Pack;
using Microsoft.AspNetCore.Mvc.Controllers;
using System.Reflection;

namespace LJ.WebApi.Mvc.DynamicWebApi.Internal;

/// <summary>
/// 动态接口控制器特性提供器
/// </summary>
public class DynamicApiControllerFeatureProvider(IDynamicWebApiManager dynamicWebApiManager) : ControllerFeatureProvider
{
    private readonly IDynamicWebApiManager _dynamicWebApiManager = dynamicWebApiManager;

    protected override bool IsController(TypeInfo typeInfo)
    {
        return _dynamicWebApiManager.IsApiController(typeInfo);
    }
}